Formation Of Planets In A Protoplanetary Disk